// Copyright 2022 Huawei Cloud Computing Technology Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef CLOUDAPPENGINE_CAEREQUESTPARAMS_H
#define CLOUDAPPENGINE_CAEREQUESTPARAMS_H

#include "CaeHeader.h"
#include <string>
#include <set>

class CaeRequestParams {
public:
    CaeRequestParams();

    CaeRequestParams(std::string method, std::string url, std::string queryParams, std::string payload, bool useUrl);

    virtual ~CaeRequestParams();

    bool GetUseUrl();

    const std::string GetMethod();

    const std::string GetHost();

    const std::string GetUri();

    const std::string GetUrl();

    const std::string GetQueryParams();

    const std::string GetPayload();

    const std::set<Header> *GetHeaders();

    void AddHeader(std::string key, std::string value);

    std::string InitHeaders(time_t validDateTime);
private:
    std::string m_method;
    std::string m_host;
    std::string m_uri;
    std::string m_queryParams;
    std::string m_payload;
    std::string m_url;

    std::set<Header> m_headers;
    bool m_useUrl;
};

#endif // CLOUDAPPENGINE_CAEREQUESTPARAMS_H
